package com.blb.productservice.controller;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.blb.productservice.pojo.Product;
import org.springframework.http.ResponseEntity;

/**
 * 降级处理类
 */
public class ProductFallback {

    public static ResponseEntity<Product> getProductByIdFallback(Long id){
        Product product = new Product();
        product.setName("降级数据");
        return ResponseEntity.ok(product);
    }
}
